package com.example.emos.wx.exception;

import lombok.Data;

/**
 * @author liujingmao
 * @version 1.0
 * @date 2021/1/31 10:42
 */

//RuntimeException 既可以手动处理，也可以自动处理
@Data
public class EmosException extends RuntimeException{

    private String msg;
    private int code = 500;

    public EmosException(String msg){
        super(msg);
        this.msg = msg;

    }

    public EmosException(String msg,Throwable e ){
        super(msg,e);
        this.msg = msg;
    }

    public EmosException(String msg,int code){
        super(msg);
        this.msg=msg;
        this.code=code;
    }

    public EmosException(String msg,int code,Throwable e){
        super(msg,e);
        this.msg = msg;
        this.code=code;
    }
}
